<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function Student(name,age,skill){
            this.name = name;
            this.agr = age;
            this.skill = skill;
        }
        Student.prototype.sayName = function(){
            console.log(this.name)
        }
        Student.prototype.sayskill = function(){
            console.log(this.skill)
        } 
        var lisi = new Student("lisi",18,"编程")
        lisi.sayName(),//lisi
        lisi.sayskill(),//编程
        console.log(lisi)//Student {name: 'lisi', agr: 18, skill: '编程'}
    </script>
</body>
</html>